local game = require "club.threecard.baccarat"

local poker = game.ui.element(game.pokerlib.core.poker)

function poker:flip(poker_data, callback, time_length)
    time_lenght = time_lenght or 0.5;
    self.transform:DOScaleX(0, time_lenght/2)
    :OnComplete(function()
        self:set_data(poker_data);
        self.transform:DOScaleX(1, time_lenght/2)
        :OnComplete(function()
            callback();
         end)
    end)
end

return poker